package nl.Viewer.ViewManager.Models.DataStores;

import nl.Viewer.SerializedObjects.DataObject;

/**
 * In a MVC (Model-View-Controller) framework a Model contains the actual data and its operations. This default DataStore
 * object (which should be overridden) is used to store arbitrary data on the client-side
 * 
 * @author Jeroen Verschuur
 * 
 */

public class DataStore {
   protected Object     currentData    = null;
   protected DataObject dataDefinition = null;

   public DataStore( DataObject dataDefinition ) {
      this.dataDefinition = dataDefinition;
   }

   public synchronized Object getCurrentData() {
      return currentData;
   }

   public synchronized void addData( Object data, int resolution, int xPos, int yPos ) {
      // do nothing in this default class
   }

   public synchronized void cleanup() {
      dataDefinition = null;
      currentData = null;
   }
   
}
